import post from "@/utils/request";
import axios from '@/utils/request/axios';

export class LoginData {
  username?: string;
  password?: string;
}

export const authLogin: (data: LoginData) => Promise<any> = async (data) => {
  const res = await axios({
    method: 'POST',
    url: '/auth/login',
    data,
  });
  return res.data;
};

export const authLoginNode: (data: LoginData) => Promise<any> = async (data) => {
  const res = await axios({
    method: 'POST',
    url: '/us/users/auth/login/open',
    data,
  });
  return res.data;
};
